import request from '@/service'
import { IDataType } from '@/service/types'

enum dashboardAPI {
  categoryGoodsCount = '/goods/category/count',
  categoryGoodsSale = '/goods/category/sale',
  categoryGoodsFavor = '/goods/category/favor',
  addressGoodsSale = '/goods/address/sale',
  goodsSaleTop10 = '/goods/sale/top10',
  goodsAmountList = '/goods/amount/list'
}

export function getCategoryGoodsCount() {
  return request.get<IDataType>({
    url: dashboardAPI.categoryGoodsCount,
    showLoading: false
  })
}

export function getCategoryGoodsSale() {
  return request.get<IDataType>({
    url: dashboardAPI.categoryGoodsSale,
    showLoading: false
  })
}

export function getCategoryGoodsFavor() {
  return request.get<IDataType>({
    url: dashboardAPI.categoryGoodsFavor,
    showLoading: false
  })
}

export function getaddressGoodsSale() {
  return request.get<IDataType>({
    url: dashboardAPI.addressGoodsSale,
    showLoading: false
  })
}

export function getGoodsSaleTop10() {
  return request.get<IDataType>({
    url: dashboardAPI.addressGoodsSale,
    showLoading: false
  })
}

export function getGoodsAmountList() {
  return request.get<IDataType>({
    url: dashboardAPI.goodsAmountList
  })
}
